Field
The present disclosure relates to a rate limiter for use in constraining the rates of different messages processed by a message gateway.
Related Art
A message gateway can be used to validate incoming messages before they are forwarded. However, in some applications the rates of different messages (such as different types of messages) may need to be constrained.
In particular, in a message gateway used to process messages with instructions from brokers and dealers for stock transactions or trades on a stock exchange, regulatory requirements sometimes mandate that the number of trades for a given stock should be bounded as a function of time. However, the message gateway may need to process, on average, a very large number of messages per second, and any delay in the processing may have negative consequences. For example, if the latency is too large, the stock price may change before a trade can be conducted. Consequently, the latency associated with processing a given message may need to be very short, e.g., on the order of microseconds. It may be difficult to achieve this design target while at the same time bounding the rates of the messages for thousands of different stocks.
Hence, what is needed is a rate limiter and/or a message gateway without the above-described problems.